This extends the usage of the native clear region call such that its
called also for windows that have parent relative background all the
way up to a native window. That way we get true background relative
background clearing even to a foreign parent, which means that some
transparent notification icons look right again.
width, height);
}
+static gboolean
+clears_on_native (GdkWindowObject *private)
+{
+ GdkWindowObject *next;
+
+ next = private;
+ do
+ {
+ private = next;
+ if (gdk_window_has_impl (private))
+ return TRUE;
+ next = private->parent;
+ }
+ while (private->bg_pixmap == GDK_PARENT_RELATIVE_BG &&
+ next && next->window_type != GDK_WINDOW_ROOT);
+ return FALSE;
+}
+
static void
gdk_window_clear_region_internal (GdkWindow *window,
GdkRegion *region,
gdk_window_clear_backing_region_redirect (window, region);
if (GDK_WINDOW_IMPL_GET_IFACE (private->impl)->clear_region &&
- gdk_window_has_impl (private))
+ clears_on_native (private))
{
GdkRegion *copy;
copy = gdk_region_copy (region);